package com.lx.annotation;

import com.lx.common.ContextConst;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 切换数据源注解
 *
 * @author 段誉
 * @create 2019-04-12 16:05
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DataSource {
  //设置默认为主数据源
  ContextConst.DataSourceType value() default ContextConst.DataSourceType.PRIMARY;
}
